package ${packageName}.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import ${packageName}.pojo.${className};

import java.util.List;

/**
* ${remark}
* @author: ${operationSupport}
* @date: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
*/
public interface ${className}Mapper extends BaseMapper<${className}> {
	
	/**
	 * @description: 清空表数据
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 */
	@Delete("TRUNCATE ${tableName}")
	void cleanTable();
	
	/**
	 * @description: 状态修改
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 * @param id 	   修改ID
	 * @param state    状态
	 * @return 数据修改条数
	 */
	@Update("update ${tableName} set state = <#noparse>#{state}</#noparse> where id = <#noparse>#{id}</#noparse>")
	Integer updateState(@Param("id") String id, @Param("state") Integer state);

	/**
	* @description: 获取所有id
	* @author: ${operationSupport}
	* @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	* @return id列表
	*/
	@Select("select id from ${tableName}")
	List<String> queryIds();
}
